/**
 * Description: 编写一个学生类，提供name、age、gender、phone、address、email成员变量，且为每个成员变量提供setter、getter方法。
 * Class Name:subject1
 * Date:2022/1/25 15:36
 *
 * @author LTisme
 * @version JAVA17
 */
package 疯狂Java讲义.第5章_面向对象_上.课后练习;

class Student{
    public String name;
    public int age;
    public String gender;
    public String phone;
    public String address;
    public String email;

    Student(String name, int age, String gender, String phone, String address, String email){
        this.name = name;
        this.age = age;
        this.gender = gender;
        this.phone = phone;
        this.address = address;
        this.email = email;
    }

    public void setName(String rename){
        this.name = rename;
    }
    public void setAge(int reage){
        this.age = reage;
    }
    public void setGender(String regender){
        this.gender = regender;
    }
    public void setPhone(String rephone){
        this.phone = rephone;
    }
    public void setAddress(String readdress){
        this.address = readdress;
    }
    public void setEmail(String reemail){
        this.email = reemail;
    }


    public String getName(){
        return this.name;
    }
    public int getAge(){
        return this.age;
    }
    public String getGender(){
        return this.gender;
    }
    public String getPhone(){
        return this.phone;
    }
    public String getAddress(){
        return this.address;
    }
    public String getEmail(){
        return this.email;
    }

    public void eat_action(){
        System.out.println("这个名叫“"+this.name+"”的学生，进行了 吃饭 这个动作。");
    }
    public void drink_action(){
        System.out.println("这个名叫“"+this.name+"”的学生，进行了 喝水 这个动作。");
    }
    public void play_action(){
        System.out.println("这个名叫“"+this.name+"”的学生，进行了 玩耍 这个动作。");
    }
    public void sleep_action(){
        System.out.println("这个名叫“"+this.name+"”的学生，进行了 睡觉 这个动作。");
    }
}

public class charpter5_subject1 {
    public static void main(String[] args) {
        var student_a = new Student("小明", 18, "男", "16620220125", "斐济", "idontcar@163.com");
        var student_b = new Student("小红", 16, "女", "19987654321", "内华达", "idoreallycare@163.com");
        student_a.eat_action();
        student_b.sleep_action();
    }
}
